<template>
	<Search title="分类" />
	<Layout pagename="classify">
		<view class="list">
			<Item v-for="item in list" :key="item._id" :item="item" />
		</view>
	</Layout>
</template>

<script setup>
	import {ref,onMounted} from "vue";
	import Layout from "../../layout/Layout.vue";
	import Search from "../../components/search.vue";
	import Item from "../../components/item.vue";
	import {GetClassify} from "../../api/index.js"
	
	const list = ref([]);
	
	onMounted(async()=>{
		const res = await GetClassify({
			pageSize:15
		})
		list.value=res.data;
	})
</script>

<style lang="scss" scoped>
.list{
	display: grid;
	gap: 16rpx;
	grid-template-columns: repeat(3,1fr);
}
</style>
